﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _2021_5_24
{
    class Teacher
    {
        private string job;

        public string Job { get => job; set => job = value; }

        public Teacher(string name , string job)
        {
            this.Job = job;
        }

        public Teacher() { }

        public virtual void Introduction()
        {
            Console.Write("我是{0}", this.job);
        }

        public void Lesson()
        {
            Console.WriteLine("{0}上课中...",this.job);
        }

    }
    //游泳运动员接口
    interface ISwimmer
    {
        void Swim();
    }
    //音乐老师类
    class MusicTeacher : Teacher, ISwimmer
    {
        public MusicTeacher()
        {
            base.Job = "音乐老师";
        }

        public void Swim()
        {
            Console.WriteLine("{0}游泳中...",this.Job);
        }

        public override void Introduction()
        {
            base.Introduction();
            Console.Write(",同时我也是一个游泳运动员。\n");
        }
    }

}
